package com.nnfe.fyd.utils;

/**
 * 连击事件判断
 *
 * @author mengxc
 */
public class OnClickUtil {

    private static long lastClickTime;

    /**
     * 连击事件判断
     *
     * @param mills 定义连击事件间隔
     * @return
     */
    public static boolean isFastDoubleClick(int mills) {
        long time = System.currentTimeMillis();
        long timeD = time - lastClickTime;
        if (0 < timeD && timeD < mills) {
            return true;
        }
        //Log.e("xyd","连击");
        lastClickTime = time;
        return false;
    }

}
